package in.muton.edushare.components.messaging.api;

import in.muton.edushare.wicket.models.CayenneList;
import in.muton.edushare.wicket.models.CayenneModel;

import java.util.List;

import org.apache.wicket.model.IModel;

import com.edushare.common.vo.MessageComments;
import com.edushare.common.vo.Messages;

public class CommentModel extends CayenneList<MessageComments> {
	public CommentModel(Messages message) {
		super(null);
		this.message = new CayenneModel<Messages>(message);
	}

	@Override
	public List<IModel<MessageComments>> getObject() {
		return new CayenneList<MessageComments>(message.getObject()
				.getComments()).getObject();

	}

	private IModel<Messages> message = null;
	private static final long serialVersionUID = 1823431816976158773L;
}
